import type { Tool, CanvasConfig } from '@/types';

// 工具配置
export const tools: Tool[] = [
    {
        key: 'select',
        name: '选择工具',
        icon: 'cursor-pointer',
        description: '选择和移动场景中的元素'
    },
    {
        key: 'add-car',
        name: '添加小车',
        icon: 'car',
        description: '在场景中添加小型车辆'
    },
    {
        key: 'add-flatcar',
        name: '添加平板车',
        icon: 'truck',
        description: '在场景中添加平板车'
    },
    {
        key: 'add-pedestrian',
        name: '添加行人',
        icon: 'person',
        description: '在场景中添加行人'
    },
    {
        key: 'add-bicycle',
        name: '添加自行车',
        icon: 'bicycle',
        description: '在场景中添加自行车'
    },
    {
        key: 'delete',
        name: '删除工具',
        icon: 'trash',
        description: '删除选中的元素'
    }
];

// 画布配置
export const canvasConfig: CanvasConfig = {
    containerId: 'canvas-container',
    initialScale: 30.00,
    backgroundColor: '#f5f5f5',
    gridLevels: [50, 10, 5, 1, 0.5],
    targetGridPixelSize: 50
};

// 块(车辆)默认配置
export const blockDefaults = {
    car: {
        collision: { l1: 4.5, l2: 1.8 },
        color: '#3498db',
        speed: 0,
        acceleration: 0
    },
    flatcar: {
        collision: { l1: 8.0, l2: 2.5 },
        color: '#e74c3c',
        speed: 0,
        acceleration: 0
    },
    pedestrian: {
        collision: { l1: 0.6, l2: 0.6 },
        color: '#2ecc71',
        speed: 0,
        acceleration: 0
    },
    bicycle: {
        collision: { l1: 1.8, l2: 0.7 },
        color: '#f39c12',
        speed: 0,
        acceleration: 0
    }
};

// 导出默认配置
export default {
    tools,
    canvasConfig,
    blockDefaults
};
